#include "setting.h"
#include "ui_setting.h"
#include"base.h"
#include<QPainter>
#include<QIcon>
setting::setting(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::setting)
{
    ui->setupUi(this);
    //初始化窗口大小
    setFixedSize(GAME_WIDTH,GAME_HEIGHT);
    //设置窗口标题
    setWindowTitle(GAME_TITLE);
    setWindowIcon(QIcon( GAME_ICON));
}

setting::~setting()
{
    delete ui;
}
void setting::changeslot()
{
    this->show();
}
void setting::paintEvent(QPaintEvent *)
{
     s.m_map2.load(MAPPATH1);
    QPainter painter(this);
    painter.drawPixmap(0,s.m_map2_posY , s.m_map2);
}

void setting::on_radioButton_2_clicked()
{
emit unlimitedsignal();
}

void setting::on_pushButton_clicked()
{
   this->hide();
}

void setting::on_radioButton_5_clicked()
{
    emit intervalfastsignal();
}

void setting::on_radioButton_4_clicked()
{
    emit intervalmidsignal();
}



void setting::on_radioButton_7_clicked()
{
    emit bulletspeedfastsignal();
}

void setting::on_radioButton_10_clicked()
{
    emit heroplaneshieldslowsignal();
}

void setting::on_radioButton_9_clicked()
{
    emit heroplaneshieldshighsignal();
}


void setting::on_radioButton_11_clicked()
{
    emit mountainmapchangesiganl();
}

void setting::on_radioButton_12_clicked()
{
    emit skymapchangesignal();
}

void setting::on_radioButton_13_clicked()
{
    emit desertmapchangesignal();
}

void setting::on_radioButton_14_clicked()
{
    emit firemapchangesignal();
}
